//
//  APIManager.h
//  RWUIControls
//
//  Created by shenchengcai on 15/3/3.
//  Copyright (c) 2015年 QM. All rights reserved.
//

/*******************************************************
 类名：APIManager.h
 功能描述：接口处理类，实现从接口请求数据的方法
 
 */

#import <UIKit/UIKit.h>
@class AFHTTPRequestOperation;

@interface APIManager : NSObject

+ (id)sharedInstance;
+ (id)loginInstance;

- (id) cachedContent:(NSString *)key;
- (void) setCachedContent:(id)content withKey:(NSString *)key;

//请求方法。向接口请求数据，并接收返回值。path方法路径；parameters参数；success请求成功时处理方法；failure请求失败时处理方法
- (void)postPath:(NSString *)path
      parameters:(NSDictionary *)parameters
         success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success
         failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure;

@end
